fn main() {
    let c1 = vec![2, 3, 5, 89, 100];
    let mx = largest(&c1);
    println!("{:?}", mx);

    let chars = vec!['y', 'm', 'a', 'w', 'z'];
    let res = largest(&chars);
    println!("{}", res);
    println!("{}", 3.to_string());
}


fn largest<T: PartialOrd + Copy >(list: &[T]) -> T {
    let mut lgst = list[0];
    for &item in list.iter() {
        if item>lgst {
            lgst = item;
        }
    }
    lgst
}